package com.str;

/**
 * 使用构造函数
 */
public class Str_02 {
    public static void main(String[] args) {
        //String()
        String s1 = new String();

        //ASCII
        byte[] arr_01 = {65,66,67,68,69};
        //String(byte[] bytes)
        String s2 = new String(arr_01);//ABCDE
        System.out.println(s2);

        //String(byte[] bytes, int offset, int length)
        String s3 = new String(arr_01,2,3);
        System.out.println(s3);//CDE

        //String(char[] value)
        char[] arr_02 = {'3','3','3'};
        String s4 = new String(arr_02);
        System.out.println(s4);//333

    }
}
